package com.resign.carl.strategy;

import com.resign.carl.strategy.api.Duck;
import com.resign.carl.strategy.api.impl.FlyRocketPowered;
import com.resign.carl.strategy.api.impl.Squeak;

/**
 * Created by carl.zhao on 2016/6/13.
 */
public class Client {

    public static void main(String[] args) {
        Duck mallard = new MallardDuck();
        mallard.performQuack();
        mallard.performFly();

        Duck model = new ModelDuck();
        model.performQuack();
        model.setFlyBehavior(new FlyRocketPowered());
        model.setQuackBehavior(new Squeak());
        model.performFly();
    }
}
